package com.sky.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;

/**
 * <p>
 * 订单明细表 Mapper 接口
 * </p>
 *
 * @author xieminghui
 * @since 2023-11-16
 */
@Mapper
public interface OrderDetailMapper extends BaseMapper<OrderDetail> {

    @Select("select sum(amount) from order_detail where order_id = #{ordersId}")
    BigDecimal sumMoney(Long ordersId);
}
